<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <input type="button" value="v-on补充" @click="doIt('老铁', 666)" />
        <input type="text" @keyup.enter="sayHi" />
    </div>
    <script src="../../js/vue.js"></script>
    <script>
        var vue = new Vue({
            el: '#app',
            methods: {
                doIt: function(a, b) {
                    console.log(a);
                    console.log(b);
                },
                sayHi: function() {
                    alert("hi")
                }
            },
        });
    </script>
</body>
</html>